package cn.wolfcode.enums;

import lombok.Getter;

/**
 * Created by wolfcode-lanxw
 */
@Getter
public enum AppointmentEnums {
    PEND("待确认",0),//  ====> public static AppointmentEnums PEND  = new AppointmentEnums(待确认",0);
    PERFORM("履行中",1),
    CONSUME("消费中",2),
    FINISH("归档",3),
    FAILURE("废弃",4);
    private String name;
    private Integer value;
    AppointmentEnums(String name,Integer value){
        this.name = name;
        this.value =value;
    }
    public static String findName(Integer value){
        AppointmentEnums[] values = AppointmentEnums.values();
        for(AppointmentEnums appointmentEnums:values){
            if(appointmentEnums.value.equals(value)){
                return appointmentEnums.name;
            }
        }
        return null;
    }


}
